package str

func maxPower(s string) int {

	if s == "" {
		return 0
	}
	maxCount := 1
	cruCount := 1

	for i := 1; i < len(s); i++ {
		if s[i] == s[i-1] {
			cruCount++
		} else {
			if cruCount > maxCount {
				maxCount = cruCount
			}
			cruCount = 1
		}
	}

	if cruCount > maxCount {
		maxCount = cruCount
	}
	return maxCount

}
